package org.jeecg.modules.knowledgecomment.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.comment.vo.CommentPublish;
import org.jeecg.modules.knowledgecomment.entity.KnowledgeComment;

import java.util.List;

/**
 * @Description: knowledge_comment
 * @Author: jeecg-boot
 * @Date: 2020-12-30
 * @Version: V1.0
 */
public interface KnowledgeCommentMapper extends BaseMapper<KnowledgeComment> {

    /**
     * TODO: openid获取用户对知识的评论
     *
     *
     * @author ZhangHaoyu
     * @param openId
     * @return java.util.List<org.jeecg.modules.comment.vo.CommentPublish>
     */
    List<CommentPublish> queryListPageByOpenId2(@Param("openId") String openId);

    /**
     * TODO: 根据知识id获取评论，并分页
     * @param page
     * @param articleId
     * @return
     */
    List<CommentPublish> queryPublishListPage(Page<CommentPublish> page, @Param("articleId") String articleId);
}
